package com.ysh.smartplatform.mapper;
import com.ysh.smartplatform.pojo.Menu;
import com.ysh.smartplatform.pojo.MenuExample;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;

import java.awt.*;
import java.util.List;

/**
 * 袁胜虎 on 2022/9/16 17:54
 */
public interface MenuMapper {
    List<Menu> selectByExample(MenuExample example);

    @Insert("insert into sys_menu (menu_id, menu_name, parent_id,order_num, url, target,menu_type, visible, enable, is_refresh,perms, icon, create_by,create_time, update_by, update_time,remark) values (#{menuId}, #{menuName}, #{parentId},#{orderNum}, #{url}, #{target},#{menuType}, #{visible}, #{enable}, #{isRefresh},#{perms}, #{icon}, #{createBy},#{createTime}, #{updateBy}, #{updateTime},#{remark})")
    int insert(Menu record);

    int insertSelective(Menu record);

    int updateByPrimaryKeySelective(Menu record);

    @Delete("delete from sys_menu where menu_id = #{menuId}")
    void deleteById(Long id);

}
